package com.qian.service.ddj.entity;


import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import java.math.BigDecimal;
import java.util.Set;

/**
 * 代付商户表
 */
@Getter
@Setter
@ToString
@Entity
@DynamicInsert
@DynamicUpdate
public class DdjDfBusiness extends BaseEntity<Integer> {
    @Column(nullable = false)
    private String secretKey; // 秘钥
    @Column(nullable = false)
    private String account; // 商户号
    @ColumnDefault("0")
    @Column(nullable = false)
    private Byte status; // 状态
    @ColumnDefault("0")
    private BigDecimal beginMoney; // 最低代付金额
    @ColumnDefault("0")
    private BigDecimal endMoney; // 最高代付金额
    @ColumnDefault("0")
    private BigDecimal fee;//代付费率
    private String name;
    private String backup1; // 备用字段
    private String backup2;
    @Column(columnDefinition = "LONGTEXT")
    private String backup3;
    private String backup4;
    private String backup5;
    private String remark; // 备注

    @ColumnDefault("0")
    private BigDecimal balance;

    @OneToMany
    private Set<DdjUser> ddjUsers;
}
